/**
 * Created by henian.xu on 2018/9/18.
 *
 */

import Promise from 'bluebird'
import sass from 'node-sass'
import {extract} from './extract';

Promise.promisifyAll(sass)

export function render(compileOptions = {}) {
  return sass.renderAsync(compileOptions).then(rendered=>{
    return extract(rendered,{compileOptions}).then(vars=>{
      console.log(vars)
    })
  })
}